getForegroundService

@RequiresApi(value = 26)
@NonNull
open fun getForegroundService(@NonNull context: @NonNull Context, requestCode: Int, @NonNull intent: @NonNull Intent, flags: Int, isMutable: Boolean): @NonNull PendingIntent(source)

Retrieves a PendingIntent with mandatory mutability flag set on supported platform versions. The caller provides the flag as combination of all the other values except mutability flag. This method combines mutability flag when necessary. See getForegroundService .